﻿using System;
using Ornament.Domain;
using Ornament.MemberShip;

namespace Ornament.Messages
{
    /// <summary>
    /// 
    /// </summary>
    public class InfoReader : DomainObject<Guid>
    {
        protected InfoReader()
        {
        }

        public InfoReader(IPerformer reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }
            Reader = reader;
        }

        /// <summary>
        /// 
        /// </summary>
        public virtual Info Info { get; set; }

        /// <summary>
        /// Gets or sets Reader
        /// </summary>
        public virtual IPerformer Reader { get; protected set; }

       

        public override int GetHashCode()
        {
            return (Info.GetHashCode() + Reader.GetHashCode());
        }
    }
}